//
//  DataOfSpecialistDisabuse.m
//  __PRODUCTNAME__
//
//  Created by li cheng on 16/09/05
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "DataOfSpecialistDisabuse.h"
#import "OffOfDataSpecialistDisabuse.h"
#import "OnOfDataSpecialistDisabuse.h"

@implementation DataOfSpecialistDisabuse

+ (NSDictionary *)objectClassInArray{
    return @{@"off" : [OffOfDataSpecialistDisabuse class], @"on" : [OnOfDataSpecialistDisabuse class]};
}

- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"off"]) {
        NSMutableArray<OffOfDataSpecialistDisabuse *> *mArrayOfOffOfDataSpecialistDisabuse = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            OffOfDataSpecialistDisabuse *offOfDataSpecialistDisabuse = [OffOfDataSpecialistDisabuse modelDic:dic];
            [mArrayOfOffOfDataSpecialistDisabuse addObject:offOfDataSpecialistDisabuse];
        }
        _off = mArrayOfOffOfDataSpecialistDisabuse;
    }
    if ([key isEqualToString:@"on"]) {
        NSMutableArray<OnOfDataSpecialistDisabuse *> *mArrayOfOnOfDataSpecialistDisabuse = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            OnOfDataSpecialistDisabuse *onOfDataSpecialistDisabuse = [OnOfDataSpecialistDisabuse modelDic:dic];
            [mArrayOfOnOfDataSpecialistDisabuse addObject:onOfDataSpecialistDisabuse];
        }
        _on = mArrayOfOnOfDataSpecialistDisabuse;
    }
}

@end
